﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

public partial class frmLogin :BaseWinFrom
{
    public frmLogin()
    {
        InitializeComponent();
    }

    private void btLogin_Click(object sender, EventArgs e)
    {
        Users u = new Users() { UserName = txtUserName.Text, UserPassword = txtPassword.Text };
        if (u.UserLogin())
        {
            ApplictionData.CurrentUser = u;
            this.Dispose();
        }
        else
        {
            MessageBox.Show("密码或用户名错误");
        }
    }
}